import { Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';
import { ServeStaticModule } from '@nestjs/serve-static';

@Controller()
export class AppController {
  constructor(
    private readonly appService: AppService,
  ) /* private readonly a: ServeStaticModule */ {}

  @Post('/api/login/account')
  getHello(): any {
    const body = {
      code: 0,
      message: 'success',
      data: {
        accessToken:
          'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJ1c2VySWRcIjpcIjJcIn0iLCJpYXQiOjE2ODgxMDQ0MTQsImV4cCI6MTY4ODE5MDgxNH0.xgoqbDsxBUR3IIwxI2ERgB7aVEJdqDzDOdtiiisvMLHl4wmjSZVFIli4IIjGoj-zZY5ko1RtpTyP5ekVj5kGqA',
        accessTokenExpires: 1688190814420,
      },
    };
    return body;
  }

  @Post('/login/account')
  getHello2(): any {
    const body = {
      code: 0,
      message: 'success',
    };
    return body;
  }
}
